package com.itheima.demo;

import java.io.File;
import java.io.IOException;

public class FileDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\Test");
        boolean mkdir = file.mkdir();
        System.out.println(file+"创建的结果是:"+mkdir);
        File file1 = new File(file,"Test.txt");
        boolean newFile = file1.createNewFile();
        System.out.println(file1+"创建的结果是:"+newFile);
        boolean delete1 = file1.delete();
        System.out.println(file1+"删除的结果是:"+delete1);
        boolean delete = file.delete();
        System.out.println(file+"删除的结果是:"+delete);
    }
}
